/**
 * @file h264_live_video_server_media_subssion.hpp
 * @author jianming.song (jianming.song@calmcar.com)
 * @brief 此文件为自定义MediaServer的示例代码，提供了内存读取H264数据的示例
 * @version 0.1
 * @date 2021-10-25
 *
 * @copyright Copyright (c) 2021
 *
 */
#ifndef H264_LIVE_VIDEO_SERVER_MEDIA_SUBSSION_HPP__
#define H264_LIVE_VIDEO_SERVER_MEDIA_SUBSSION_HPP__
#include "OnDemandServerMediaSubsession.hh"
class VideoDevice;
class H264LiveVideoServerMediaSubssion : public OnDemandServerMediaSubsession
{
public:
    static H264LiveVideoServerMediaSubssion *createNew(UsageEnvironment &env, Boolean resume_first_source);

protected:
    H264LiveVideoServerMediaSubssion(UsageEnvironment &env, Boolean resume_first_source);
    ~H264LiveVideoServerMediaSubssion();

protected:
    FramedSource *createNewStreamSource(unsigned client_session_id, unsigned &est_birate);
    RTPSink *createNewRTPSink(Groupsock *rtp_groupsock,
                              unsigned char rtp_payload_type_if_dynamic,
                              FramedSource *input_source);

private:
    VideoDevice* device_;
};
#endif